From: Bilal Elmoussaoui Date: Mon, 10 Jun 2024 22:45:09 +0000 (+0200) Subject: shell/screenshot: Don't use region type where rect is enough X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~92 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cbf1d372f1ed69e0b9f40e9b62e50f9bf1410b38;p=gnome-shell.git shell/screenshot: Don't use region type where rect is enough New API added in https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3801 Part-of: --- diff --git a/src/shell-screenshot.c b/src/shell-screenshot.c index 5c4885d39..a2503c3f3 100644 --- a/src/shell-screenshot.c +++ b/src/shell-screenshot.c @@ -376,7 +376,6 @@ draw_cursor_image (cairo_surface_t *surface, MetaDisplay *display; MetaCursorTracker *tracker; cairo_surface_t *cursor_surface; - g_autoptr (MtkRegion) screenshot_region = NULL; cairo_t *cr; int x, y; int xhot, yhot; @@ -390,12 +389,11 @@ draw_cursor_image (cairo_surface_t *surface, if (!texture) return; - screenshot_region = mtk_region_create_rectangle (&area); meta_cursor_tracker_get_pointer (tracker, &point, NULL); x = point.x; y = point.y; - if (!mtk_region_contains_point (screenshot_region, point.x, point.y)) + if (!mtk_rectangle_contains_point (&area, point.x, point.y)) return; meta_cursor_tracker_get_hot (tracker, &xhot, &yhot);